import { Service } from 'egg';
export default class swiper extends Service {
  public async addSwiper(store) {
    console.log(store);
    
    let res = await this.ctx.model.Swiper.create({
      image: store
    })
    if (res) {
      return res
    } else {
      throw new Error()
    }

  }
  
  public async getSwiper() {
    let res = await this.ctx.model.Swiper.findAll()
    if (res) {
      return res
    } else {
      throw new Error()
    }

  }
}